Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sokol_imgui.h: simplify ImTextureID handling. #1169

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Conversation

floooh
Copy link
Owner

@floooh floooh commented Dec 16, 2024

Since Dear ImGui's ImTextureID is now guaranteed to be 64 bits, the sokol-gfx image+sampler pair can now be stashed directly into the ImTextureID instead of requiring a 'backing object'. This simplifies the sokol_imgui.h implementation drastically.

Also: in sokol_gfx.h, add granular sg_query_buffer_X() and sg_query_image_X() functions which allow to cheaply query buffer and image properties without having to return a big desc struct (might make sense to extend for samplers, but probably less useful for shaders, pipelines and attachments).

TODO:

@floooh floooh merged commit 789d970 into master Dec 17, 2024
64 checks passed
@floooh floooh deleted the simgui-image-handles branch December 17, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant